using System;
using System.Collections.Generic;
using System.Text;
using DevExpress.XtraNavBar.ViewInfo;
using DevExpress.XtraNavBar;
using System.Drawing;
using DevExpress.Utils.Drawing;

namespace DemoCenter {
    public class SkinExplorerBarViewInfoRegistratorEx : SkinExplorerBarViewInfoRegistrator {
        public override NavBarViewInfo CreateViewInfo(DevExpress.XtraNavBar.NavBarControl navBar) {
            return new SkinExplorerBarNavBarViewInfoEx(navBar);
        }
        public override BaseNavGroupPainter CreateGroupPainter(NavBarControl navBar) { return new SkinExplorerBarNavGroupPainterEx(navBar); }

        public override string ViewName {
            get {
                return "SkinEx";
            }
        }

    }
    public class SkinExplorerBarNavGroupPainterEx : SkinExplorerBarNavGroupPainter {
        public SkinExplorerBarNavGroupPainterEx(NavBarControl navBar) : base(navBar) { }
        public override Rectangle CalcObjectMinBounds(ObjectInfoArgs e) { return Rectangle.Empty; }
        protected override void DrawGroupCaptionCore(NavGroupInfoArgs e, CustomDrawNavBarElementEventArgs custom) {

        }

    }
    public class SkinExplorerBarNavBarViewInfoEx : SkinExplorerBarNavBarViewInfo {
        public SkinExplorerBarNavBarViewInfoEx(NavBarControl navBar) : base(navBar) { }
        public override bool AllowHideGroupCaptions {
            get {
                return true;
            }
        }
        protected override int CalcGroupVertIndent(NavGroupInfoArgs groupInfo) { return 0; }
        protected override void UpdateScrollBar(int maxBottom, ref int savedY) {
            if(maxBottom < Client.Height) maxBottom = Client.Height + 1;
            base.UpdateScrollBar(maxBottom, ref savedY);
        }
    }
}
